package designmodel.handler.raiseSalary;

import java.util.Arrays;
import java.util.List;

/**
 * 审批客户端
 *
 * @author scylla
 * @version V1.0
 * @project echo-java-base
 * @title 审批客户端
 * @package designmodel.handler.raiseSalary
 * @since 2022/5/19 7:08 下午
 */
public class ManagerClient {

    public static void main(String[] args) {

        List<OARequest> oaRequestList = Arrays.asList(
                new OARequest(AbstractManager.JIAXIN, "小张申请加薪", 1500),
                new OARequest(AbstractManager.JIAXIN, "小吴申请加薪", 500),
                new OARequest(AbstractManager.JIAXIN, "小李申请加薪", 3600),
                new OARequest(AbstractManager.QINGJIA, "小军申请调休", -3),
                new OARequest(AbstractManager.QINGJIA, "小王申请调休", 5),
                new OARequest(AbstractManager.QINGJIA, "小周申请调休", 1)
        );

        TeamLeader teamLeader = new TeamLeader("牛组长");
        CommonLeader commonLeader = new CommonLeader("刘经理");
        MajorLeader majorLeader = new MajorLeader("闸总");

        teamLeader.superior(commonLeader)
                .superior(majorLeader);


        oaRequestList.forEach(teamLeader::doApproval);


    }
}
